package com.chen.authority.model.po;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.hutool.core.date.DatePattern;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 登录日志 持久化对象
 *
 * @author chengy
 * @date 2022-11-04
 */
@Data
@TableName("sys_login_log")
public class LoginLogPo implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键id
     */
    private Integer id;

    /**
     * 登录用户名
     */
    @Excel(name = "登录用户名", width = 20)
    private String username;

    /**
     * 登录IP
     */
    @Excel(name = "登录IP", width = 20)
    private String ip;

    /**
     * 登录地点
     */
    @Excel(name = "登录地点", width = 20)
    private String location;

    /**
     * 浏览器类型
     */
    @Excel(name = "浏览器类型", width = 20)
    private String browser;

    /**
     * 操作系统
     */
    @Excel(name = "操作系统", width = 20)
    private String os;

    /**
     * 登录状态
     */
    @Excel(name = "登录状态", width = 20, replace = {"成功_0", "失败_1"})
    private Integer status;

    /**
     * 提示消息
     */
    @Excel(name = "提示消息", width = 20)
    private String message;

    /**
     * 登录时间
     */
    @Excel(name = "登录时间", width = 20, format = DatePattern.NORM_DATETIME_PATTERN)
    private Date loginTime;

}